<script>
	import apis from 'api.js'
	import {
		mapMutations,
		mapState
	} from 'vuex' //导入vuex的mapState和mapMutations方法
	export default {
		onLaunch:function(){
			console.log('APP Onlaunch')
			
		},
		onShow: function() {
			console.log('App Show')
			
		},
		onHide: function() {
			console.log('App Hide')
		},
		computed: {
			...mapState(['token','userInfo','hasLogin']), //对全局变量hasLogin进行监控
		},
		data(){
			return{
				
			}
		},
		methods:{
			...mapMutations(['login','logout'])
		},
		// onLaunch() {
		// 	// let userInfo = uni.getStorageSync('userInfo') || '';
		// 	// if(userInfo.userId){
		// 	// 	uni.getStorage({
		// 	// 		key:'userInfo',
		// 	// 		success:(res)=>{
		// 	// 			console.log(res)
		// 	// 			this.login(res.data)
		// 	// 		}
		// 	// 	})
		// 	// }
			
		// }
	}
</script>

<style>
	/*每个页面公共css */
	.container-root {
	  height: 100%;
	  width: 100%;
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	}
	.login-title {
		width: 100%;
		padding: 100rpx 0rpx;
		display: flex;
		flex: 1;
		align-items: center;
		justify-content: center;
		color: #00b9ef;
		font-size: 40rpx;
	}
	.login-input{
		width: calc(100% - 40rpx);
		height: 240rpx;
				
		display: flex;
		flex-direction: column;
		border: 1rpx solid #C0C0C0;
		border-radius: 20rpx;
	}
	.login-user-pwd{
		width: 100%;
		height: 120rpx;
		
		display: flex;	
		flex-direction: row;
		align-items: center;
		justify-content:flex-start;
	}
	.login-image{
		width: 50rpx;
		height: 50rpx;
		padding: 0rpx 10rpx;
	}
	.login-forget{
		width: calc(100% - 40rpx);
		height: 80rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;		
	}
	.login-forget text{
		color: #b1b1b1b1;
	}
	.login-submit{
		width: calc(100% - 40rpx);
		height: 100rpx;
		border-radius: 20rpx;
				
		display: flex;
		justify-content: center;
		align-items: center;
		color: white;
		background-color: #00B9EF;
		font-size: 40rpx;		
	}
	.login-submit::after{
		border: none;
	}
	.login-submit-hover{
		background-color: rgba(0, 185, 239, 0.7);
	}
	.empty-root{
		width: 100%;
		height: 90rpx;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		font-size: 28rpx;
		color: #333;
	}
	.empty-image{
		width: 30rpx;
		height: 30rpx;
		margin-right: 10rpx;
	}
	.line {
		width: 100%;
		height: 0rpx;
		border: 1rpx solid #cbcbcb;
		/* opacity: 1; */
	}
</style>
